package cc.comac.mom.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipRepairWorkHourService;
import cc.comac.mom.bean.EquipRepairWorkHour;
import cc.comac.mom.bean.base.LimitPageBean;
import cc.comac.mom.datahandlers.entity.EquipRepairWorkHourDataHandler;
import cc.comac.mom.entity.EquipRepairWorkHourEntity;
import cc.comac.mom.util.ResultBean;

@Service
@RestController
public class EquipRepairWorkHourServiceImpl implements EquipRepairWorkHourService {
	@Autowired
	private EquipRepairWorkHourDataHandler equipRepairWorkHourDataHandler;

	@Override
	public ResultBean insert(@RequestBody EquipRepairWorkHour obj) {
		// TODO Auto-generated method stub
		return equipRepairWorkHourDataHandler.insert(obj);
	}

	@Override
	public ResultBean update(@RequestBody EquipRepairWorkHour obj) {
		// TODO Auto-generated method stub
		return equipRepairWorkHourDataHandler.update(obj);
	}

	@Override
	public ResultBean delete(@RequestBody EquipRepairWorkHour obj) {
		// TODO Auto-generated method stub
		return equipRepairWorkHourDataHandler.delete(obj);
	}

	@Override
	public ResultBean selectByCondition(@RequestBody EquipRepairWorkHour obj) {
		ResultBean resultBean = new ResultBean(true);
		LimitPageBean<EquipRepairWorkHourEntity> selectByCondition = equipRepairWorkHourDataHandler
				.selectByCondition(obj);
		resultBean.setObject(selectByCondition);
		return resultBean;
	}

}
